package org.cos.verifier.utility;

/*
 * Created on Apr 21, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author SMarkowitz1271
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Timer extends Thread {  
	private boolean stop = false;
	public Timer(int i, TimerListener t) {  
		target  = t;
		interval = i;
		setDaemon(true);
	}
	public void done () { stop = true;}
	
	public void run() {  
		try {  
			while (!interrupted()) {  
				sleep(interval);
				target.time_elapsed(this);
			}
		}
		catch(InterruptedException e) {
		//System.out.println("run error");	
		}
	}
	private TimerListener target;
	private int interval;
	public static void main(String[] args) {
	}
}

